# -*- coding:utf-8
"""
作者: Jia
日期: 2022年04月16日
描述: 练习4.3 习题3
"""
import turtle


def square(t, length):
    for i in range(4):
        t.fd(length)
        t.lt(90)


def polygon(t, length, n):
    for i in range(n):
        t.fd(length)
        t.lt(360 / n)


paint = turtle.Turtle()
edge_length = 80
polygon(paint, edge_length, 8)
turtle.mainloop()
